

// 全局注册指令
const handler = (e) => {
  e.preventDefault();
};

export default {
  componentUpdated (el, binding) {
    if (binding.value) {
      document.getElementsByTagName('body')[0].addEventListener('touchmove', handler, { passive: false });
    } else {
      document.getElementsByTagName('body')[0].removeEventListener('touchmove', handler, { passive: false });
    }
  }
}